package com.jrowny.controls
{
	
	import flash.events.MouseEvent;
	
	import mx.containers.Box;
	import mx.managers.CursorManager;
	import mx.managers.CursorManagerPriority;
	
	public class Dragger extends Box
	{
		public static const TOP_LEFT:String = "tl";
		public static const TOP_RIGHT:String = "tr";
		public static const TOP_CENTER:String = "tc";
		public static const LEFT_CENTER:String = "lc";
		public static const RIGHT_CENTER:String = "rc";
		public static const BOTTOM_CENTER:String = "bc"
		public static const BOTTOM_RIGHT:String = "br";
		public static const BOTTOM_LEFT:String = "bl";
		
		private var _type:String = TOP_LEFT;
		
		public var cursorId:int;
		private var _cursor:Class = Cursors.HORIZONTAL;
		
		public function Dragger(type:String,cursor:Class)
		{
			_type = type;
			_cursor = cursor;
			super();
			this.addEventListener(MouseEvent.MOUSE_OVER,function():void{ cursorId = CursorManager.setCursor(_cursor,CursorManagerPriority.HIGH,-16,-16); });
			this.addEventListener(MouseEvent.MOUSE_OUT,function():void{ CursorManager.removeCursor(cursorId); });
			
		}
		public function get type():String{
			return _type;
		}
		public function set type(value:String):void{
			_type = value;
		}
		
				
	}
}